An eyewitness outside the facility in the southern port city of Aden, about 320 km south of the capital, Sanaa, said the gunmen, suspected to be from the local branch of Al-Qaeda, freed several prisoners.
Officials declined to comment on whether any detainees had been freed.
A statement by the Supreme Security Committee, headed by Yemen's president, said seven security men, three women and a seven-year old child were killed in the exchange of fire.
The attack began when armed men wearing military uniforms threw hand grenades and fired rocket propelled grenades at the entrance of the regional intelligence headquarters and then shot their way into its detention facility, where Al-Qaeda suspects are often held, the security officials said.
The eyewitness, who works at the building and was outside at the time of the attack, said he saw four gunmen attack the entrance before rushing inside in a blaze of gunfire. In the ensuing firefight, the attackers managed to escape with several detainees.
Speaking to The Associated Press by phone from Aden, the witness said he saw at least 10 seriously wounded or dead bodies lying near the building before ambulances took them away. The eyewitness spoke on condition of anonymity for fear of reprisals.
He said the attackers drove up to the facility in a car and a minivan and parked at a nearby hotel before the attack.
Nearby residents also reported heavy gunfire and plumes of smoke rising from the building, as well as ambulances leaving the area.
The security officials said nine others were injured, while hospital officials said at least 15 people had been brought to a local hospital in Aden.
Though no group has claimed immediate responsibility for the attack, the government statement said it bore the hallmarks of Al-Qaeda according to the initial investigation.
An official speaking on condition of anonymity because he was not authorized to speak to the press said that so far eight people have been arrested for suspected involvement in the attack.
Yemen has seen several Al-Qaeda prison breaks before. The last major jail break came in July 2006, when 23 Al-Qaeda militants tunneled out of a prison. Many of them went on to plan further terrorist attacks in Yemen and abroad.
In 2003, 10 men escaped from the same building in Aden, including one later convicted of involvement in the plot to blow up the USS Cole in 2000, killing 17 American sailors.
It was the 2006 escape, however, that really boosted Al-Qaeda's strength in Yemen, culminating in the January 2009 merger with the Saudi branch of the organization and the formation of Al-Qaeda in the Arabian Peninsula.
The brazen prison break highlights the challenges Yemen's US-backed government faces in battling increasingly bold Al-Qaeda elements that have found refuge in the country. US officials fear Yemen is becoming a terror staging ground and say insurgents, including individuals from the US, are training in militant camps in Yemen's vast lawless spaces.
Those concerns deepened last December, when Al-Qaeda in the Arabian Peninsula claimed responsibility for the failed attempt to blow up a Detroit-bound airliner.
