A St. Paul man is accusing the city and four of its police officers of violating his constitutional rights by unlawfully detaining him in a hot squad vehicle for nearly an hour last year.

Osha Joseph was held in the back seat of a St. Paul police squad vehicle in 80-degree-plus heat on July 10, 2016, while officers searched his home, according to a complaint filed Tuesday in U.S. District Court.

After an officer shut his foot in the vehicle’s door, Joseph repeatedly demanded to be let out of the squad because it was too hot inside, eventually vomiting on the floor, the complaint said.

In addition to the city of St. Paul, the complaint names Sgt. Bobby Donahue, Sgt. Tom Arnold, Officer Mon Notthakun and Officer Marshall Titus as defendants. Joseph is seeking more than $50,000 in damages.

In a written response to Joseph’s suit filed Tuesday, Lawrence Hayes, St. Paul’s assistant city attorney, denied that Joseph’s rights were violated during the incident and called the officers’ actions “legally reasonable, proper and necessary under the circumstances.”

Earlier on the day of the incident, St. Paul police had located a GMC Yukon across the street from Joseph’s home in the Payne-Phalen neighborhood, according to the complaint.

The Yukon was allegedly connected to a violent confrontation the night before between police and demonstrators protesting the fatal shooting of Philando Castile by St. Anthony police officer Jeronimo Yanez, said Adam Johnson, one of two attorneys representing Joseph in the case.

The four officers named in the suit detained Joseph while investigators searched his home, according to the complaint. Johnson said Joseph did not own the Yukon, but declined to comment further on Joseph’s connection to the vehicle or why police searched Joseph’s home.

A St. Paul police spokesman said the department does not comment on pending litigation.

Joseph was placed inside the squad vehicle at 2:12 p.m., according to the complaint, which is based on footage recorded by the squad’s video camera. When Notthakun attempted to close the squad vehicle door, it shut on Joseph’s foot, causing him to cry out in pain, the complaint said.

The officers offered to summon a medic before closing the door at 2:14 p.m., according to the complaint. The complaint notes that temperatures in St. Paul that day exceeded 80 degrees.

The door was opened at 2:22 p.m., and someone — assumed to be a medic — examined Joseph’s foot, the complaint said. The person said he believed the foot was sprained and recommended that it be iced and kept elevated.

After his foot was examined, Joseph asked that he be allowed to leave the squad car, but the officers refused and closed the door again at 2:26 p.m., according to the complaint.

For the next 15 minutes, Joseph shouted that the vehicle was too hot and that he needed his inhaler, punching the seat in front of him and hitting the window with his elbow, the complaint said. At 2:41 p.m., Titus opened the door and told Joseph that he would be placed in hand and leg restraints if he continued to hit the inside of the vehicle, according to the complaint.

Two minutes later, Joseph began vomiting on the floor of the squad vehicle, the complaint said. At 2:45, an officer opened the vehicle door and Joseph continued to vomit out the door.

The officers then handed Joseph an inhaler before closing the door again at 2:47 p.m., according to the complaint. Joseph continued to shout and vomit until he was allowed to leave the squad vehicle at 3:10 p.m.

In his filing, Hayes, the assistant city attorney, called the account in Joseph’s complaint “an incomplete recitation of events depicted in said squad video.”

Joseph was never charged in connection with the search of his home, Johnson said.