A Gardiner man who was sought by Maine State Police over the weekend after he allegedly didn’t return a car after a test drive and ran away from a traffic stop has been arrested.

Jason Maxim, 37, was taken into custody around 7 p.m. Monday on Lincoln Avenue in Gardiner, state police said. They said he was hiding in an upstairs apartment that was not his and is now at the Kennebec County jail, where he is being held on $5,000 bail.

State police said on their Facebook page Sunday that Maxim was wanted on two outstanding warrants for operating after suspension and theft by unauthorized taking or transfer. The latter charge was lodged because he did not return a car after taking it for a test drive from a Farmingdale dealership, state police said.

State police said Maxim also was being sought for running away from a traffic stop in Gardiner on Saturday after providing a false name and date of birth to troopers.

They said he dropped his cellphone while running away.