WASHINGTON — When Kashyap Pate l was an aide to the House Intelligence Committee in the first years of the Trump administration, he played a key role in helping Republicans try to undermine the Russia investigation, writing a memo that accused law enforcement officials of abusing their power.

The memo, which consumed Washington for weeks, was widely dismissed as a biased argument of cherry-picked facts. But it galvanized President Trump’s allies and made Mr. Patel a hero among them. After Republicans ceded control of Congress this year, he landed on Mr. Trump’s National Security Council staff.

Colleagues there initially questioned the role of Mr. Patel, who took few notes in meetings and had little expertise for his initial portfolio, which covered the United Nations. Within months, senior White House officials began to suspect he had won Mr. Trump’s ear and had effectively created a back channel to the president that could warp American policy, according to congressional testimony and interviews.

Colleagues grew alarmed after hearing that Mr. Trump had referred to Mr. Patel as one of his top Ukraine policy specialists and that the president wanted to discuss related documents with him, according to people briefed on the matter. Mr. Patel sought to discuss allegations of surveillance abuses by law enforcement officials with Mr. Trump, an administration official said. Mr. Patel, who is known as Kash, is now assigned to work on counterterrorism issues , not Ukraine.