Midlothian police officers took a suspect into custody after a two-hour search Wednesday afternoon.

At about 12:40 p.m., Midlothian police officer Matt McCaskill observed a person he knew was wanted on a felony warrant near 14th Street and Main Street, according to a press release from the department. The person ran into the wooded area behind O'Reilly's Auto Parts store when McCaskill attempted to make contact with him.

Midlothian police officers were assisted by an Ellis County K9 Unit; Mike Jones, Ellis County Constable for Precinct 4; and a Texas Department of Public Safety helicopter while attempting to contain the suspect in the area, the release stated.

"After tracking and calls from witnesses who observed the suspect running, officer Stephanie Hanson observed the suspect just north of the Midtown development and she pursued him on foot," the release stated.

The suspect stopped and gave up at the south side fence of Midlothian Cemetery, according to the release.

"We would like to thank everybody for the positive comments," stated a post on the Midlothian Police Department's Facebook page. "People in cars were pulling up to our officers on the street and coming out of their houses and offering bottles of water to the officers looking for the suspect. We are proud to work in such a great community and have the support of our citizens."