Armed men opened fire and took an unknown number of hostages at a hospital in Tijuna in the apparent attempt to free a prison inmate receiving medical treatment.
Two people were killed, including a security guard and one of the attackers, police has said.
Dozens of police and soldiers stormed the hospital and shots were heard ricocheting from the building on Wednesday.
Authorities evacuated personnel and patients from three of the facility's seven floors, Red Cross representative Fernando Esquer said. He said some hostages had been taken, but he did not know how many.
He said the attack was related to the arrival earlier in the day of the unidentified Tijuana prison inmate, who was receiving a routine medical procedure.
Tijuana Police Commander Jaime Niebla said that that between six and eight assailants had gone into the hospital.
Police and army troops closed off streets surrounding the hospital.
In January, President Felipe Calderon sent 3,300 soldiers and federal police to Tijuana to hunt down drug gangs.
Dubbed "Operation Tijuana," the initiative was part of a nationwide military offensive launched by Calderon against who has sent more than 24,000 troops to states plagued by execution-style killings and beheadings as rival gangs fight over marijuana plantations and smuggling routes.
Drug gangs were blamed for more than 2,000 murders nationwide in 2006 and have left a particularly bloody trail in Tijuana, where more than 300 people were slain last year.