Officers from the U.S. Marshals Service's Fugitive Task Force
went to the motel in Topeka on Saturday night to look for Orlando J. Collins, the FBI's Kansas City office said. Collins, 28, was wanted on two robbery-related charges.
But as officers reached the motel room door, "they came under gun fire from inside the hotel room," the FBI said in a statement.
Two deputy U.S. marshals and an FBI agent were shot but are expected to survive, the FBI said.
Previously, Topeka police said a fourth federal agent had been injured in the melee. That officer apparently suffered a leg injury but was not shot, the FBI said.