US President Donald Trump demanded that Mexican President Enrique Peña Nieto stop publicly saying the country would not pay for a wall along the US-Mexico border, according to a transcript of a January 27 phone call between the two leaders published Thursday by The Washington Post.

"You cannot say that to the press," Trump said in the call, adding that the funding "will work out in the formula somehow" and "will come out in the wash, and that is OK."

He continued: "If you are going to say that Mexico is not going to pay for the wall, then I do not want to meet with you guys anymore because I cannot live with that."

Constructing a border wall paid for by the Mexican government was a cornerstone of Trump's presidential campaign, despite repeated statements from Mexican leaders that it would not do so.

In the transcript of the call, Trump acknowledged that his campaign promise, and Peña Nieto's refusal to accommodate it, had left both parties with a "political problem."

"The fact is we are both in a little bit of a political bind because I have to have Mexico pay for the wall — I have to," Trump said. "I have been talking about it for a two-year period, and the reason I say they are going to pay for the wall is because Mexico has made a fortune out of the stupidity of US trade representatives."

Trump proposed that when either man was asked about payments for the wall, he should respond by saying, "We will work it out."

"It will work out in the formula somehow," he continued. "As opposed to you saying, 'We will not pay,' and me saying, 'We will not pay.'"

Trump also attempted to convince Peña Nieto that the cost of the wall itself would be unimportant, as he knows "how to build very inexpensively." During his presidential campaign, Trump estimated his wall would cost $8 billion, but estimates from the Department of Homeland Security have pegged the cost at closer to $21.6 billion.

"It will be much lower than these numbers I am being presented with, and it will be a better wall, and it will look nice," Trump said, according to the transcript. "And it will do the job."

Later in the call, Peña Nieto told Trump that his "position has been and will continue to be very firm saying that Mexico cannot pay for that wall."

"This is an issue related to the dignity of Mexico and goes to the national pride of my country," he added.

Peña Nieto then said that discussing the wall was preventing them from moving on to other matters and that the pair could "find a creative way of looking into this issue."

Trump agreed, adding that when the press asked about the border wall, he would respond, "Let us see how it is going — let us see how it is working out with Mexico."