It was the biggest speech of Melania Trump's life, and her husband, Donald, wanted it to be perfect.
The Trump campaign turned to two high-powered speechwriters, who had helped write signature political oratory like George W. Bush's speech to the nation on Sept. 11, 2001, to introduce Ms. Trump, a Slovenian-born former model, to the nation on the opening night of the Republican National Convention.
It did not go as planned, and it has eclipsed much of the action at the party gathering in Cleveland, where delegates on Tuesday night formally nominated Mr. Trump for president.
The speechwriters, Matthew Scully and John McConnell, sent Ms. Trump a draft last month, eager for her approval.
Weeks went by. They heard nothing.
Inside Trump Tower, it turned out, Ms. Trump had decided she was uncomfortable with the text, and began tearing it apart, leaving a small fraction of the original.
Her quiet plan to wrest the speech away and make it her own set in motion the most embarrassing moment of the convention: word-for-word repetition of phrases and borrowed themes from Michelle Obama's speech at the Democratic convention eight years ago.
The ridicule from both Democrats and Republicans was instant and relentless, disrupting what was meant to be a high point of the convention.
It was, by all accounts, an entirely preventable blunder, committed in front of an audience of 23 million television viewers, that exposed the weaknesses of an organization that has long spurned the safeguards of a modern presidential campaign, such as the free software that detects plagiarism.
More from The New York Times:
Questions Over Melania Trump's Speech Set Off Finger-Pointing
Melania Trump: From Small-Town Slovenia to Doorstep of White House
Donald Trump Claims Nomination,With Discord Clear but Family Cheering
"It just shouldn't have happened," said Matt Latimer, a White House speechwriter for President George W. Bush. "This was an easy home run speech: a successful, attractive immigrant talking about her husband."
Nobody seemed more startled than Mr. and Ms. Trump, who arrived in New York on Tuesday morning after a flight from Cleveland to find themselves at the center of a bizarre uproar over authenticity, plagiarism and a knotty question: Why did the wife of the Republican nominee borrow passages from the wife of the current Democratic president?
Ms. Trump spent most of Tuesday out of sight, while her husband vented his frustration and anger throughout the day.
This account of how a speech written by professionals was transformed into the problematic version delivered on Monday night at the Quicken Loans Arena is based on interviews with more than a dozen people involved in and close to the Trump campaign. Many of them spoke on the condition of anonymity to disclose details that were supposed to remain confidential.
It reinforces dominant themes of Mr. Trump's campaign that still linger from the primary, which his team has struggled to change: a deliberately bare-bones campaign structure, a slapdash style and a reliance on the instincts of the candidate over the judgments of experienced political experts, like Mr. Scully and Mr. McConnell.
The two original speechwriters were not aware of how significantly the speech had been changed until they saw Ms. Trump deliver it on television Monday night, along with the rest of the country.
In the prime-time address, Ms. Trump unfurled a sequence of life lessons — about how "your word is your bond," about "your dreams and your willingness to work for them," and the "integrity, passion and intelligence" of her parents — in the same sequence and using much of the same language that Mrs. Obama employed in 2008.
Just like Mrs. Obama, Ms. Trump explained how she wanted to pass those lessons on to her children and the children of the world. And just like Mrs. Obama, she offered a gauzy invocation about the limitlessness of aspirations when they are matched by determination.
In a series of evolving explanations, Trump aides and allies dismissed the episode as a trivial distraction, alternating between outright denial that Ms. Trump's speech had used word-for-word phrases from Mrs. Obama and blaming the news media.
"Ninety-three percent of the speech is completely different," declared Gov. Chris Christie of New Jersey. Paul Manafort, Mr. Trump's campaign chairman, pegged the number of suspicious words at 50. "And that includes 'ands' and 'thes' and things like that," he said on Tuesday.