WASHINGTON — Rinat Akhmetshin, a Russian immigrant who met last summer with senior Trump campaign officials, has often struck colleagues as a classic Washington mercenary — loyal to his wife, his daughter and his bank account. He avoided work that would antagonize Moscow, they suggested, only because he profited from his reputation as a man with valuable connections there.

But interviews with his associates and documents reviewed by The New York Times indicate that Mr. Akhmetshin, who is under scrutiny by the special counsel Robert S. Mueller III, has much deeper ties to the Russian government and Kremlin-backed oligarchs than previously known.

He has an association with a former deputy head of a Russian spy service, the F.S.B., and a history of working for close allies of President Vladimir V. Putin. Twice, he has worked on legal battles for Russian tycoons whose opponents suffered sophisticated hacking attacks, arousing allegations of computer espionage. He helped federal prosecutors bring corruption charges against an American businessman in the former Soviet Union who turned out to be working for the C.I.A.

He also helped expose possible corruption in government contracting that complicated American efforts to keep troops at an air base in Kyrgyzstan — an American presence that the Russians fiercely opposed.