Madison police said people who heard a woman's screams came to her aid Tuesday morning as a stranger attacked her inside a downtown apartment building.
Police said a 22-year-old Madison woman struggled with the suspect, a 27-year-old Madison man, prior to be yanked into the elevator about 10:15 a.m.
The incident happened on the ground floor of an apartment building in the 1000 block of West Johnson Street, according to a Madison Police Department incident report.
Police said the victim kept the man from getting her inside the elevator just long enough for witnesses to get to the elevator door before it could close.
Police said the suspect released the victim as passersby kept him detained, inside the elevator, while police responded.
Police said the suspect has been detained but not formally arrested, so his name is being withheld at this time. The suspect does not live in the building where the assault took place, according to the incident report.