Agents with the US Federal Bureau of Investigation (FBI) raided the home of a Washington Post reporter this week as part of an investigation into a government contractor accused of leaking classified information, officials said.

In a post on X, US Attorney General Pam Bondi said agents had searched the home of a journalist who allegedly was obtaining and reporting classified and illegally leaked information from a Pentagon contractor.

Bondi said the contractor had been arrested.

The Washington Post identified the reporter to the BBC as Hannah Natanson, who has covered how President Donald Trump's administration has drastically reduced and reshaped the federal workforce.

Natanson was at her home in Virginia on Wednesday when federal agents came to search her home, according to the Washington Post. They took her phone, a work and personal computer and a Garmin watch, the outlet said.

Natanson was told she was not the focus of the probe, according to the Washington Post, which reported that officials were investigating Aurelio Perez-Lugones, a system administrator in Maryland with top-secret security clearance.

According to an FBI affidavit, Perez-Lugones - a systems engineer and information technology specialist on contract for the government since 2002 - accessed and printed classified intelligence reports.

Officials said they found classified information in a lunch box while searching Perez-Lugones' car, according to court filings. The filing does not mention Perez-Lugones disseminating the information.

The court filings say Perez-Lugones has been charged with unlawful retention of national defense information. He is scheduled to appear in court on Thursday.

Bondi said the Trump administration would not tolerate illegal leaks of classified information that, when reported, pose a grave risk to our Nation's national security and the brave men and women who are serving our country.

The search of Natanson's home sparked concerns from press freedom and free speech advocates.

Any search targeting a journalist warrants intense scrutiny because these kinds of searches can deter and impede reporting that is vital to our democracy, Jameel Jaffer, the executive director of the Knight First Amendment Institute, said in a statement.

Natanson previously wrote about her experience gathering more than 1,000 sources who currently and formerly worked for the federal government, as she reported on the layoffs, buyouts and firings that Trump has used since returning to office to shrink the federal workforce and change the focus of many agencies.

Natanson wrote about sources inside government agencies sharing information they weren't supposed to tell me and the intensity of receiving sensitive information from so many people.

In April, Bondi ended Biden-era policies that had protected journalists from having their phone records seized or being forced to testify in leak probes.