WASHINGTON — The Obama administration has begun directly providing weapons to Kurdish forces who have started to make gains against Islamic militants in northern Iraq, senior U.S. officials said Monday. But the aid has so far been limited to automatic rifles and ammunition. Previously, the U.S. sold arms in Iraq only to the government in Baghdad, which has largely failed in recent years to transfer them to the Kurdish forces in the north, American officials have said. Baghdad made some transfers with American help in recent days, since U.S. airstrikes began to support Kurdish forces fighting off the Islamic State advance toward the northern city of Irbil. But U.S. officials decided to begin their own deliveries. The Kurdish peshmerga fighters had been losing ground to Islamic State militants in recent weeks, in part because they were outgunned and at times ran out of ammunition, officials said. The weapons appeared to be coming through intelligence agencies covertly and not through regular Defense Department channels. A Kurdish official said the weapons were coming from “U.S. intelligence agencies,” and a senior Pentagon official said the Defense Department may yet get involved. The CIA has historically done similar quiet arming operations. The move to directly aid the Kurds underscores the level of U.S. concern about the Islamic State militants’ gains in the north, and reflects the persistent administration view that the Iraqis must take the necessary steps to solve their own security problems.