A speechwriter on Wednesday took responsibility for parts of a speech Republican presidential candidate Donald Trump's wife Melania gave at the Republican convention this week that drew accusations of plagiarism.

Meredith McIver, a staff writer for the Trump Organization, said she had inserted passages into Melania Trump's speech that resembled parts of a 2008 speech by first lady Michelle Obama.

“I did not check Mrs. Obama’s speeches. This was my mistake and I feel terrible for the chaos I have caused Melania and the Trumps, as well as to Mrs. Obama. No harm was meant,” McIver said in a statement.

She said Melania Trump had read passages from Michelle Obama’s speech to the 2008 Democratic National Convention over the phone to her as examples. McIver then wrote them down and later included some of the phrasing in a draft that became Melania Trump's speech on Monday night.

In a potentially embarrassing admission for the Trump campaign, McIver said the first lady is a person that Melania Trump "has always liked.”

A small section of Melania Trump's roughly 15-minute speech, a highlight of the opening day of the convention in Cleveland, was similar to Michelle Obama’s speech in support of Barack Obama, then a U.S. senator campaigning for president.

Accusations of plagiarism plagued the Trump campaign from the moment news of the similarities emerged.

Under pressure to explain what had happened and who was to blame, Trump's people offered different versions of events on Monday and Tuesday.

Hours before giving the speech on Monday, Melania Trump told NBC's "Today" that she wrote it with as little help as possible. But her husband's campaign manager, Paul Manafort, told CBS' "This Morning" on Tuesday that it was a collaboration with speechwriters.

Democrats said the affair and the explanations showed Trump's team was not ready for prime time, all the more embarrassing because Trump has accused the presumptive Democratic nominee Hillary Clinton of being untrustworthy.

The Trump Organization is owned Donald Trump.