WASHINGTON — President Trump’s condolence call to the widow of a slain soldier exploded into a vicious row that swamped the White House on Wednesday, with the soldier’s grieving mother accusing the president of disrespecting her family and a defiant Mr. Trump complaining that his words had been cynically twisted for political purposes.

The back-and-forth made a furious spectacle of what is, at the best of times, one of the most emotionally wrenching contacts between the commander in chief and a bereaved citizen. It overshadowed any talk of Mr. Trump’s legislative priorities and instead recalled his history of feuding with military families or even, as in the case of Senator John McCain, a war hero.

Twelve days after four Americans were killed in an Oct. 4 ambush in Niger, the president called the widow of Sgt. La David T. Johnson, who was among the slain, and said that her husband “knew what he signed up for,” referring to the soldier only as “your guy,” according to Sergeant Johnson’s mother and a Democratic congresswoman, who both listened to the call.

Mr. Trump angrily disputed that account, insisting that he “had a very nice conversation with the woman, with the wife, who sounded like a lovely woman.” The White House accused the congresswoman, Frederica S. Wilson of Florida, of politicizing a sacred ritual after Mr. Trump initially said she “fabricated” it.