A controversial trip to Morocco by Environmental Protection Agency chief Scott Pruitt last December was partly arranged by a longtime friend and lobbyist, who accompanied Pruitt and his entourage at multiple stops and served as an informal liaison at both official and social events during the visit.

Richard Smotkin, a former Comcast lobbyist who has known the EPA administrator for years, worked for months with Pruitt’s aides to hammer out logistics, according to four individuals familiar with those preparations. In April, Smotkin won a $40,000-a-month contract, retroactive to Jan. 1, with the Moroccan government to promote the kingdom’s cultural and economic interests. He recently registered as a foreign agent representing that government.

The four-day journey has drawn scrutiny from lawmakers and the EPA inspector general, who is investigating its high costs and whether it adhered to the agency’s mission to “protect human health and the environment.”