A standoff that lasted more than 25 hours with a robbery suspect who barricaded himself inside a San Francisco home ended Thursday afternoon, police said.

Police said the suspect, who family members said was mentally ill, was detained and transported to a hospital.

Officers, SWAT crews and hostage negotiators swarmed around a home near the Ingleside/Taravel border earlier in the day during the standoff, which began at 1:30 p.m. Wednesday.

The suspect had barricaded himself in a home in the 200 block of Miramar Avenue. Police said he had allegedly robbed someone earlier Wednesday afternoon and made off with an electronic device.

No other information was immediately available.