WASHINGTON — Senator James M. Inhofe, the chairman of the Senate Armed Services Committee, came under fire on Thursday for purchasing tens of thousands of dollars of stock in a leading defense contractor just a week after he successfully lobbied the Trump administration to increase military spending.

A spokeswoman for Mr. Inhofe, Republican of Oklahoma, said he canceled the transaction, which was performed by a third-party adviser who manages his investment portfolio, after he was made aware of it by The Daily Beast. Citing his role as committee chairman, a position he assumed in September, Mr. Inhofe asked the financial adviser to no longer purchase defense or aerospace holdings, said the spokeswoman, Leacy Burke.

“I am not consulted or involved in any stock transactions,” Mr. Inhofe, 84, said in a statement printed on cards that he distributed to reporters on Thursday. “When this came to my attention, I took immediate action to reverse the trade.”

According to a Senate financial disclosure report, Mr. Inhofe bought $50,000 to $100,000 worth of stock on Tuesday in Raytheon, a major Massachusetts-based defense contractor that has won billions of dollars in missile contracts from the Pentagon.