The claims were made by a lawyer for the family of Marian Brown during an inquest into her death in 1972.
The witness, identified only as Soldier A, was part of an eight-man patrol of the Royal Anglian regiment.
They had set up a vehicle checkpoint in the Roden Street area of west Belfast the night that 17-year-old was killed.
Soldier A described being shot at by three gunmen, one of whom was inside a car at the Roden St junction with the Grosvenor Road.
He said he saw muzzle flashes from either corner of the junction and from the passenger seat of the vehicle.
Soldier A said around 30 shots were fired at the soldiers.
The marksman said he fired one shot at the vehicle and that he knew he had hit the car, because he never missed.
The Brown family lawyer accused Soldier A and his colleagues of making up the story because of his own illegal behaviour or of someone else in his patrol.
The lawyer accused Soldier A of "nothing short of an attempt at a cover-up".
She said shots fired by soldiers had killed Marian Brown and wounded three others that night.
Solder A said he had told the truth and, speaking directly via video link to the Brown family who were in court, he said that in the Troubles the Army was at war with the IRA.
He said: "Sadly in war situations, you get fatalities and injuries."
He said he was very sorry about Marian Brown's death and he hoped the family can draw some sort of closure from the inquest.
The inquest continues.
An Army marksman who opened fire in a disputed shooting in which a pregnant teenager died has been accused of being involved in an attempted cover-up.