A man armed with guns at an apartment in Windsor sparked a five-hour police standoff Wednesday night that ended just before midnight with the man taken into custody, authorities said.

The standoff, which started around 7 p.m., was based on a report that the man was armed and despondent, police said. It occurred at an apartment building at 475 Ridge Road, off Route 32 across from Hussey’s General Store.

The 36-year-old man was not identified by police.

“The man was armed with two guns and was threatening to shoot himself,” Steve McCausland, spokesman for the Department of Public Safety, said in a news release Thursday.

The guns were a shotgun and a pistol, and no shots were fired, McCausland said in an interview. He said state police troopers who first arrived there had some initial contact with the man in his apartment.

Authorities closed down that section of Route 32 and redirected traffic as the Maine State Police tactical team and negotiators responded. No injuries were reported.

Four other people in the apartment and other people in adjoining apartments evacuated the building, McCausland said.

After the standoff ended around midnight, the man was taken to MaineGeneral Medical Center in Augusta for evaluation. He was still being evaluated there Thursday morning. No charges have been filed.