When President Trump publicly denied on April 3 that he wanted his signature on stimulus checks that would be sent to millions of Americans struggling amid a pandemic, officials in the Treasury Department were already secretly working on a plan to get the president’s name on the payments.

Trump, who was reportedly musing about placing his signature on the checks as early as late March, defended the unprecedented move Wednesday.

“I don’t know too much about it. But I understand my name is there,” Trump said. “I don’t know where they’re going, how they’re going. I do understand it’s not delaying anything, and I’m satisfied with that. I don’t imagine it’s a big deal. I’m sure people will be very happy to get a big, fat, beautiful check and my name is on it.”

The effort to put Trump’s name on millions of “Economic Impact Payment” checks began shortly after the president on March 27 signed the bipartisan $2 trillion legislation aimed at stemming the financial fallout from a global pandemic that has halted much of the economy. It will be the first time a president’s name appears on an Internal Revenue Service disbursement.

While Trump has spent recent weeks talking with friends and supporters about his coronavirus response and his reelection campaign, the effort to place his name on the checks was largely kept secret until this week, with top White House officials in the dark until the plan became public. The White House press office did not respond to requests for comment Wednesday.

Some senior officials at the IRS did not find out about the plan until Tuesday morning, underscoring the unorthodox process that has turned Trump’s desire into reality.

After privately suggesting to Treasury Secretary Steven Mnuchin that he be allowed to formally sign the checks, Trump settled for having his name printed in the memo section, according to administration officials, who spoke on the condition of anonymity to discuss internal deliberations.

The placement of Trump’s name on the stimulus checks was taken out of the hands of the IRS early in the process, according to two government officials. The plan has been closely held within the IRS, and Commissioner Charles Rettig has not discussed it on his daily calls with his top executives, senior agency officials said.

When the decision came down from the Treasury Department late Monday that the first batch of paper checks would include “Donald J. Trump” on the memo line, it was announced to just five senior IRS officials.

The IRS, already tasked with quickly disbursing hundreds of billions of dollars in payments to Americans, is now rushing to prepare checks that bear Trump’s name. The signature line will continue to feature the name of a civil servant, keeping with long-standing practice, but the IRS must change the computer code to add Trump’s name before the Bureau of the Fiscal Service can print the checks, officials said.

On Wednesday, working remotely on laptops in their homes across the country, the computer code developers and testers on the IRS’s technology teams raced to program the agency’s mainframe computers to add the president’s name to the template for millions of paper stimulus checks.

They’re the first batch to be issued to Americans whose banking information the IRS does not have. With many Americans struggling to pay their bills, making the change and testing the new system must be done under a time crunch. The process is supposed to start on Thursday. The IRS and the Treasury Department said the last-minute change would not delay the payments.

Democratic leaders seized on a report in The Washington Post that the decision to put Trump’s name on the relief checks could delay the delivery of some of the payments.

“Delaying direct payments to vulnerable families just to print his name on the check is another shameful example of President Trump’s catastrophic failure to treat this crisis with the urgency it demands,” House Speaker Nancy Pelosi (D-Calif.) said in a statement Wednesday.

House Majority Leader Steny H. Hoyer (D-Md.), said the potential delay reflected the “height of insecurity” by Trump. “In the midst of this crisis, President Trump is doing what he always tends to do: make it all about Trump,” he said.

Rep. Ayanna Pressley (D-Mass.) took to Twitter to voice her displeasure, calling the move “a cruel political stunt from a petulant man who’s failing our families.”

Some Republicans defended Trump.

Sen. Charles E. Grassley (R-Iowa) said previous presidents took steps to show the public their role in stimulus efforts. Grassley issued a statement defending the decision as nothing out of the ordinary and carrying a “negligible expense.”

“Presidents regularly associate their name with economic stimulus programs,” the statement said.

The Treasury Department and the IRS pushed back against claims that Trump’s decision to add his name to the stimulus checks could delay their delivery.

“Thanks to hard work and long hours by dedicated #IRS employees, Economic Impact Payments are going out on schedule, as planned, without delay, to the nation,” the IRS said Wednesday on Twitter. “The IRS employees are delivering these payments in record time.”

Millions of Americans began receiving payments of up to $1,200 on Wednesday via direct deposit. Those electronic payments, which were part of a $2 trillion bipartisan coronavirus rescue package, did not include Trump’s name.

But for Americans who receive paper checks by mail — about 70᠆million of the 150 million who qualify — Trump’s name will feature prominently in the memo section.

On April 3, the president was asked about a Wall Street Journal report that said he had spoken to friends about wanting to sign the checks. He denied it.

“No. Me sign? No. There’s millions of checks,” Trump said. “I’m going to sign them? No. It’s a Trump administration initiative. But do I want to sign them? No.”

But the president often personalizes the pandemic response. In his daily news briefings, he spends considerable time describing what his administration has done to combat the pandemic.

On March 27, Trump lashed out against state governors who had criticized his response, saying any criticism of him amounts to criticism of the broader federal effort.

“I think they should be appreciative because you know what? When they’re not appreciative to me, they’re not appreciative to the Army Corps,” he said. “They’re not appreciative to FEMA.”

Trump has also indicated a desire to have the federal government provide unemployment checks to millions of out-of-work individuals, seeking to take over the role traditionally played by states. It’s not clear if the president also wanted to sign such federally provided unemployment checks.

Millions of Americans have already opened their mailboxes to find Trump’s name. In March, the Centers for Disease Control and Prevention sent out postcards with the headline “PRESIDENT TRUMP’S CORONAVIRUS GUIDELINES FOR AMERICA.” The card included several recommendations for slowing the spread of the virus, including washing hands and avoiding recreational travel.

According to a person familiar with the conversations, Pelosi pushed Mnuchin during negotiations on the economic rescue package to ensure that as many checks as possible were deposited though direct deposit; she told House Democrats that she had told Mnuchin that to the extent there had to be paper checks, she didn’t want to see them held up for Trump’s signature or anything similar.

While several senior Trump administration officials said they did not know where Trump got the idea for putting his name on the stimulus checks, many said they were not surprised by the move. Trump has long exhibited a desire for featuring his signature prominently on objects, including newspaper clippings, stock market charts and even Bibles.

Hours after the House of Representatives impeached him in December, Trump signed copies of the two impeachment articles for a supporter, the Detroit Free Press reported.

While visiting Houston in the aftermath of Hurricane Harvey in 2017, Trump signed the wall of an events center that was being used to house storm victims and the homeless.

Josh Dawsey and Erica Werner contributed to this report.