Discuss as:

British soldier in Afghanistan gives birth at base attacked by Taliban

A British soldier serving in Afghanistan has given birth to a baby boy at a NATO compound attacked by the Taliban just a few days earlier, the U.K. government confirmed Thursday.

The child was born Tuesday at a field hospital in Camp Bastion in the war-torn Helmand province, the government said in a statement.

The mother, a gunner with the Royal Artillery, arrived in Afghanistan in March after the child was conceived, a U.K. spokeswoman confirmed. The woman only discovered she was pregnant and about to give birth when she complained of stomach pain.

On Friday night, two U.S. personnel were killed and several others wounded in an attack on the adjoining Camp Leatherneck. The Taliban has also promised to do everything it can to kill the U.K.'s Prince Harry, who is based at Bastion.

Two US service members killed at Afghan camp where Prince Harry is based

The government statement said that "mother and baby are both in a stable condition in the hospital and are receiving the best possible care." 

It said that a specialist pediatric retrieval team was being prepared and "will deploy in the next few days in order to provide appropriate care for mother and baby on the flight home."

'Not military policy'
The statement added that the U.K.'s defense ministry was unaware that the woman was pregnant and stressed that it was "not military policy to allow service women to deploy on operations if they are pregnant."

"As with all medical cases, when the need arises individuals are returned to the U.K. for appropriate treatment/care," it said.

Four US soldiers killed in Afghan 'insider' attack

Four U.S. troops fighting with the NATO-led alliance were killed in another suspected "insider" attack in southern Afghanistan.  NBC's Atia Abawi reports.

Lieutenant Colonel Andrea Lewis, commanding officer of the hospital, said the birth was “a unique occurrence, but my team is well rehearsed in the unexpected and they adapted brilliantly to this situation as a result.”

“I am pleased to report that mother and baby are doing well and we are all delighted at the outcome,” she added.

The U.K. spokeswoman told NBCNews.com that they were not currently releasing any more information about the mother and that she was not currently available for interview.

"As I'm sure you can understand, having just had a baby she needs a bit of space," she said in an email.

More world stories from NBC News:

Follow World News from NBCNews.com on Twitter and Facebook