The attack took place on Saturday at the headquarters of the Royal Engineers in Northern Ireland at Massereene, northwest of Belfast.
The injured included two soldiers and two civilians.
Some reports suggested that it may have been a drive-by shooting, while others suggested the attackers had entered the barracks. Around 30 to 40 shots were reportedly fired.
Jeffrey Donaldson, a Democratic Unionist politician, told the British Broadcasting Corporation television (BBC) that he understood men armed with machine guns, who had possibly arrived in "a pizza delivery van", had entered the barracks.
August, 1969: A Catholic civil rights movement escalates into rioting in Derry and Belfast. UK troops return to N Ireland.
March, 1972: N Ireland government is suspended and direct rule imposed from London.
1974: Irish Republican Army (IRA) launches bombing campaign in Ireland and on the British mainland.
April, 1998: Good Friday Agreement is signed, ending twenty-four years of violence in which 3,000 people were killed.
March, 2007: Power-sharing government agreed with devolved power from London.
July, 2007: UK troops begin withdrawal.
"This is a terrible attack. I understand that gunmen with machine guns entered the barracks, the entrance of Massereene barracks at Antrim and opened fire," he said.
"This is a terrible reminder of the consequences of terrorism. We've had this in the past and no one wants to see this happening in Northern Ireland."
Gerry Adams, the president of Sinn Fein, the Irish nationalist party, condemned the attack, saying republicans had a duty to oppose a "wrong and counterproductive" act.
"Those responsible have no support, no strategy to achieve a united Ireland," said Adams
"Their intention is to bring British soldiers back onto the streets. They want to destroy the progress of recent times and to plunge Ireland back into conflict."
Officials dismissed reports that the attackers had posed as pizza delivery men to breach the base's security.
Brian Cowen, the Irish prime minister, also condemned the attack, saying: "A tiny group of evil people cannot and will not undermine the will of the people ... to live in peace together."
The motive behind the attack remained unclear, a spokesman for the Police Service of Northern Ireland said, but there is speculation that the attacks were carried out by a republican paramilitary group.
"The deep suspicions of the authorities here - of the government and of the police - would be the following: that dissident republicans - republicans who don't want a British presence on the island of Ireland in any manifestation - were responsible for this attack," Emmonn Mallie, a Belfast-based journalist, told Al Jazeera.
Shane Greer, a political analyst, described the attack as a criminal act.
"The last time a British soldier was murdered in Northern Ireland by terrorist forces was 1997 ... We shouldn't elevate this beyond what it is. It is an act of criminal barbarism. These people will in no way derail the peace process in Northern Ireland," Greer told Al Jazeera.
Last week, Hugh Orde, Northern Ireland's police chief, warned of possible attacks by republican paramilitaries.
"But nobody expected this to happen so quickly and particularly nobody expected an attack in this geographical location," Mallie said.
"I think the chief constable was anticipating an attack further away from Belfast, possibly on the border with the Irish Republic."
Following the attack, Peter Robinson, Northern Ireland's first minister, postponed an imminent official trip to the United States.
Northern Ireland endured three decades of civil unrest known as the Troubles in which around 3,000 people were killed. The violence largely ended with the signing of the 1998 Good Friday Agreement.
A deal was agreed in 2007 in which the mainly Protestant Democratic Unionists, which wants Northern Ireland to stay part of Britain, and Catholic Sinn Fein, which calls for integration into the Republic of Ireland, agreed to form a power-sharing government which has devolved power from London.
Paramilitary attacks in Northern Ireland are now relatively rare compared to the height of the Troubles.
However, the last 18 months have seen an upsurge in violent activity from republican paramilitaries opposed to the peace process.