An "at-large" alligator that had kept residents in New Jersey's Middlesex County on the edge was captured on Thursday by police after a two-week chase, city authorities said.

The reptile, which was on the loose for the past two weeks, was captured late at night on a roadway by the Piscataway Township Police Department, just outside of New York City.

Multiple patrol units responded to the scene when a citizen called police after spotting the alligator, reported MyCentralJersey.com, part of the USA TODAY Network.

Police officers were able to "subdue" the alligator and lasso a leash around its 3- to 4-foot body. The apprehended gator was then put into a patrol car and taken to police headquarters where it was secured in a cell, the outlet reported.

Watch:Brave farmer feeds 10,000 hungry crocodiles fresh meat every day

Gator appeared in good health

The New Jersey Division of Fish and Wildlife under the New Jersey Dept. of Environment Protection took possession of the alligator Thursday night and transported it to the Cape May Zoo where it will temporarily stay before being sent to a sanctuary in Florida.

The environment protection department said that the animal appeared to be in good health and had no apparent injuries. They added that officers continue to review this incident.

Possession of alligators and crocodiles among other potentially dangerous species is against the law in New Jersey.

The department noted that such animals are sometimes purchased out of state and brought into New Jersey illegally.

"The owners often release them in local water bodies when they find they can no longer care for the animal," said the department.

'He was massive':Mississippi alligator hunters catch 13-foot, 650-pound giant amid storm

'We were just in awe':Massive 920-pound alligator caught in Central Florida

Two-week chase

The alligator was first spotted on August 23 in a lake in Victor Crowell Park in Middlesex Borough. Local residents said they'd spotted the alligator in the lake and one resident reported seeing a duck on a pond in the park get pulled under the water without resurfacing, calling it “very traumatic."

Authorities then sealed the park and set a trap to capture the reptile on the edge of the water where it was last seen. Drones and video cameras, animal control officers in waders and kayaks and other officers were deployed to capture the reptile.

Saman Shafiq is a trending news reporter for USA TODAY. Reach her at sshafiq@gannett.com and follow her on X, the platform formerly known as Twitter @saman_shafiq7.

Disclaimer: The copyright of this article belongs to the original author. Reposting this article is solely for the purpose of information dissemination and does not constitute any investment advice. If there is any infringement, please contact us immediately. We will make corrections or deletions as necessary. Thank you.