Rep. Joaquin Castro, D-Texas, on Tuesday launched a probe into Secretary of State Mike Pompeo’s speech at the Republican National Convention, saying it breaks precedent of sitting secretaries of state avoiding partisan politics.

"It is highly unusual, and likely unprecedented, for a sitting Secretary of State to speak at a partisan convention for either of the political parties. It appears that it may also be illegal,” Castro said in a letter addressed to Deputy Secretary of State Stephen Biegun.

Castro mentioned the Hatch Act, which prohibits federal employees from engaging in political activities while on duty.

"In furtherance of the constitutionally mandated obligation to conduct oversight of the State Department, as well as to determine whether and legislative action is necessary, to address this matter, the Subcommittee on Oversight and Investigations intends to examine this issue carefully," Castro continued.

Pompeo’s remarks were prerecorded from Jerusalem, as he makes a diplomatic tour around the Middle East.

“Looking forward to sharing with you how my family is more SAFE and more SECURE because of President Trump,” Pompeo tweeted on Sunday. “See you all on Tuesday night!”

The speech by Pompeo contradicts previous guidance to State employees. In a July cable, Pompeo told diplomats that they should not engage in “partisan political activity.”

A state department spokesperson said Pompeo was delivering the RNC remarks in a personal capacity, with no taxpayer funds being used.

Pompeo has served as Secretary of State since April 2018, after serving as CIA director from 2017 to 2018.