Open this photo in gallery:

U.S. President Donald Trump and Secretary of the Department of Homeland Security Markwayne Mullin in the Oval Office on March 24.Chip Somodevilla/Getty Images

A Canadian citizen who posts anonymous online criticism of U.S. President Donald Trump has launched a lawsuit against the Department of Homeland Security, saying it is wrongfully trying to compel Google to unmask him.

The lawsuit filed in California last month says the plaintiff identified as “John Doe” posts “extensively” about politics on social media, including strong opposition to Trump’s policies, although he hasn’t been to the United States in more than a decade.

The complaint says the Department of Homeland Security under Secretary Markwayne Mullin is trying to compel Google to disclose “vast swaths” of information about the plaintiff.

The lawsuit says the department issued Google an administrative summons seeking records about his accounts including his name, where he lives, his browsing history and “extensive information about his physical movements.”

U.S. House approves bill to fund DHS and end record shutdown

It says Google has not released the information yet, but the company has said it can’t “hold out forever.”

The lawsuit alleges the summons was issued unlawfully under a code pertaining to import and export records, and the plaintiff alleges the release of the records would reveal his identity and information about his online activities.

Lawyers for the American Civil Liberties Union, who are representing the plaintiff, did not immediately respond to requests for comment, and nor did the Department of Homeland Security.