Iraq war casualty a medic.
The dead soldier, who M has not been named, was serving with the Royal Army Medical Corps when the Shaat Al Arab Hotel base, Basra, came under fire.
A second forces member, also not identified, was injured in the attack.
The Ministry of Defence described the incident as an "indirect fire attack" which can mean mortar or rocket fire, but did not specify which for operational reasons.
The incident takes the number of British service personnel who have died since the start of hostilities in Iraq to 119.
A spokesman in Iraq said that 15 shells had been fired at the compound, with three landing inside.
"This was a very serious indirect fire attack, and we have in recent weeks increased our security measures there, and were it not for these security measures we could have had more casualties," Major Charles Burbridge said.
Basra police said that one round which apparently missed the compound had landed on a nearby home, killing two children aged seven and three and wounding a third.