Pompeo appeared at the Republican National Convention Tuesday night delivering a speech via a prerecorded video package that was taped in Jerusalem. During his remarks, Pompeo said that Trump’s America First policy had made the U.S. a safer place.

“It may not have made him popular in every foreign capital, but it’s worked,” Pompeo said.

Secretary Pompeo praised President Donald Trump’s foreign policy moves, including relocating the U.S. Embassy from Tel Aviv to Jerusalem. Pompeo referred to Jerusalem as “this very city of God” and “the rightful capital of the Jewish homeland.”

Some saw the move of the embassy as an attack on Palestine, which also considers Jerusalem its capital. The city features holy sites for both Judaism as well as Islam. Palestinian officials have suggested dividing the city and declaring East Jerusalem Palestine’s capital, however Israeli officials bristle at the proposal.

Pompeo also referred to the recent peace deal between Israel and the United Arab Emirates brokered by the White House as “the deal our grandchildren will read about in their history books.”

What Pompeo said Tuesday may be overshadowed by where and how he chose to say it. Pompeo recorded the remarks while on a diplomatic trip to the Middle East. Pompeo’s choice to tape his RNC speech while on official business has been controversial, with some wondering if Pompeo violated federal policy.

On Tuesday, Chairman of the Subcommittee on Oversight and Investigations for the House Foreign Affairs Committee Joaquin Castro questioned the legality and propriety of Pompeo’s actions.

“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,” Castro wrote in a letter to Stephen E. Biegun, the U.S. Deputy Secretary of State. “It appears that it may also be illegal.”

Castro alleged that Pompeo’s taped speech may be in violation of the Hatch Act, a federal law that prohibits some government employees from participating in certain political activities that could be viewed as partisan.

“Secretary Pompeo was on official travel—funded on an apolitical basis by every American taxpayer—when the speech was pre-recorded and likely will be on official business when it will be shown at the RNC,” Castro’s letter read. “Similarly, he was outside the United States when the speech was recorded and will be outside the United States when it airs.”

Castro said Pompeo’s speech was a “flagrant violation” of the Foreign Affairs Manual, which prohibits employees of the State Department from participating in “partisan political activities abroad.”

Castro asked for a briefing and the answers to a list of questions, including what role the State Department had in facilitating Pompeo’s appearance, including setting up “transportation, coordination with the host government, diplomatic security, and lodging.”

In a statement, the State Department claimed that Pompeo made the address to the RNC in his “personal capacity.”

“No State Department resources will be used,” the State Department said. “Staff are not involved in preparing the remarks or in the arrangements for Secretary Pompeo’s appearance. The State Department will not bear any costs in conjunction with this appearance.”

Trump’s administration has forged a strong relationship with Israel. In 2017, the White House announced it would officially recognize Jerusalem as the capital of Israel.

“I’ve judged this course of action to be in the best interests of the United States of America and the pursuit of peace between Israel and the Palestinians,” Trump said during December 2017 remarks.

At a Wisconsin rally in August, Trump said that he made the decision to recognize Jerusalem in order to please Evangelical Americans. “You know, it’s amazing with that,” Trump said. “the evangelicals are more excited by that than Jewish people.”