WASHINGTON — Special Counsel Robert Mueller's investigation into Russian contacts with President Donald Trump's campaign has gained access to thousands of emails sent and received by Trump officials before the start of his administration, according to several people familiar with Trump's transition organization. But the investigators did not directly request the records from Mr. Trump's still-existing transition group, Trump for America, and instead obtained them from a separate federal agency that stored the material, according to those familiar with the Trump transition organization.

A transition attorney sent letters Saturday to two congressional committees saying the General Services Administration had improperly provided the transition records to Mueller's investigators. Kory Langhofer, general counsel for the transition group, wrote to the Republican chairmen of the House Oversight committee and the Senate Homeland Security committee about what the transition contends was an "unauthorized" disclosure of its emails.

The GSA has provided office space and other aid to presidential transitions in recent years and typically houses electronic transition records in its computer system. But Trump for America considers the records private and privileged and not government property.

The people familiar with the transition organization spoke to The Associated Press on condition of anonymity because of the records' sensitivity.

Get Breaking News Delivered to Your Inbox

On Sunday morning, a spokesman for the special counsel's office, Peter Carr, responded to allegations that the emails had been obtained improperly.

"When we have obtained emails in the course of our ongoing criminal investigation, we have secured either the account owner's consent or appropriate criminal process," Carr said.

Officials said the materials included communications from more than a dozen senior Trump transition officials. Among the officials who used transition email accounts was former national security adviser Michael Flynn, who pleaded guilty to a count of making false statements to FBI agents in January and is now cooperating with Mueller's investigation. Flynn was fired by Mr. Trump in February for misleading senior administration officials about his contacts with Russia's ambassador to the U.S.

It's unclear how revelatory the email accounts maintained by the GSA will be for Mueller. Several high-level Trump advisers sometimes used other email accounts to communicate about transition issues between Election Day and the inauguration.

Jay Sekulow, an attorney on Mr.Trump's personal legal team, referred questions to the transition group. Neither GSA representatives nor Flynn attorney Robert Kelner were immediately available to respond to AP's emailed requests for comment.

Officials with Trump for America learned last Wednesday that GSA officials had turned over the massive cache of emails to Mueller's team. The transition group's top officials were alarmed because many of the emails that Mueller's investigators now have are sensitive records ranging from national security discussions about possible Trump international aims to candid assessments of candidates for top government posts, said those familiar with the transition.

Officials with Trump for America had been bracing for months for the prospect that Mueller's team would demand its emails, but they had been assured that any requests to the GSA would be routed to the transition organization, which claims legal ownership of the records. According to those familiar with the transition group, a top GSA official informed Trump for America last June that any request from Mueller's office would be referred to the transition.

On Sept. 1, after requests in late August from Mueller's office, the GSA turned over a flash drive containing tens of thousands of records without informing Trump for America of its move, those familiar with the transition said.

Those records included emails sent and received by 13 senior Trump transition officials.

The media site Axios first reported on the transfer of the emails to Mueller's team.