ITHACA, N.Y. -- A lengthy standoff came to an end late Tuesday night in the city of Ithaca. The man police were after is believed to be the same person who robbed a pizza delivery driver at gunpoint earlier in the week.

Police had been searching for the suspect since Monday, when they say he pulled a gun on a Domino’s delivery driver on the 400 block of Elm Street.

They say during the robbery, the suspect fired two shots into the ground, but no one was hurt. He allegedly stole about $30 and some credit cards.

Then Tuesday night around 8 p.m., police say they found the suspect at an apartment along West Village Place. But before they could take him into custody the suspect barricaded himself inside an apartment, and refused to come out.

Authorities then shut down the street and called in SWAT to handle negotiations. After three hours, the suspect was eventually taken into custody.

Officials say they train to handle these sorts of situations.

"Our people know how to deal with these situations and that was the situation tonight.  It was resolved peacefully, nobody was hurt.  And we have one individual in custody,” said Ithaca Deputy Police Chief Vincent Monticello.

Police also say a meth lab was found in the apartment. The suspect's name has not yet been released, but the investigation is ongoing.