North Yorkshire Police had closed off Scalby Road between Manor Road roundabout and the Crown Tavern roundabout.
Police negotiators and armed police were at the scene at a block of flats, Nathan Court, on Scalby Road.
People were urged to stay away from the area while officers dealt with the incident.
COURT: Scarborough brothers threw man around 'like a rag doll' during vicious street attacks
Scarborough seaweed farm SeaGrown win Government contract to help increase renewable energy
Vandalised Scarborough allotments to be restored as council approves plans to help tackle hundreds stuck on waiting lists
Firefighters respond to Whitby railway blaze and arson in Scarborough
Police issue appeal to find missing Bridlington man Cameron
Police tweeted: "The incident - involving a vulnerable man in a nearby property - has been brought to a safe conclusion.
"He has been taken to hospital for treatment. As always, thank you for your patience and support!"
As wellas police, North Yorkshire Fire Service and Northern Gas Network were on hand at the scene.
Nathan Court is a flats development on Scalby Road near its junction with Harley Street, and opposite the junction with Stepney Avenue.