President Trump told the widow of one of the U.S. service members who was killed in an ambush by Islamic State-linked militants in Niger earlier this month that the soldier knew "what he signed up for, but I guess it still hurts," during a phone call Tuesday, according to a Democratic lawmaker.

Rep. Frederica Wilson, D-Fla., said she overheard the conversation Trump had with Army Sgt. La David Johnson's widow, Myeshia Johnson, as they traveled together to meet Johnson's body in Miami.

Trump apparently challenged Wilson's claim in a tweet Wednesday: "Democrat Congresswoman totally fabricated what I said to the wife of a soldier who died in action (and I have proof). Sad!"

Wilson, in an interview on CNN minutes after Trump's tweet, rejected the president's claim, saying "I have proof, too." Wilson said other members of Johnson's family and others also heard parts of the conversation on speaker phone.

Democrat Congresswoman totally fabricated what I said to the wife of a soldier who died in action (and I have proof). Sad!

— Donald J. Trump (@realDonaldTrump) October 18, 2017

"So the president evidently is lying, because what I said is true," she said. "I have reason to lie on the president of the United States with a dead soldier in my community."

Myeshia Johnson, who is six months pregnant with the couple's third child, was very emotional after the phone call, Wilson said at a news conference Tuesday.

“To me that is something that you can say in a conversation, but you shouldn't say that to a grieving widow," Johnson said. "Everyone knows when you go to war you could possibly not come back alive. But you don't remind a grieving widow of that. It's so insensitive."

She told CNN Trump needs to learn from President Obama and become "presidential."

"I asked them to give me the phone because I wanted to speak with him," Wilson told CNN. "And I was going to curse him out. That was my reaction at that time. I was livid. But they would not give me the phone."

More: Trump makes false claim that former presidents didn't call families of slain troops

Related: 4th U.S. soldier dead after attack in Niger, U.S. officials say

Four soldiers were shot and killed while on a reconnaissance patrol in the west African country on Oct. 3. They were serving in Niger as part of an operation to train local forces to combat the Boko Haram terror group, which has ties to the Islamic State and al-Qaeda.

Trump was widely criticized after he defended his slow public response to the deaths of the soldiers, falsely claiming that most of his predecessors never called the families of service members killed in action.

The White House, according to ABC News, declined to comment.

"The president's conversations with the families of American heroes who have made the ultimate sacrifice are private," a White House official told ABC News.

Contributing: Gregory Korte and Heidi M. Przybyla