ERBIL, Iraq—Iraqi forces took control of the local government building in Kirkuk on Monday, pushing out Kurdish fighters and effectively retaking the oil-rich city after skirmishes that raised fears of a wider conflict between two of the closest U.S. allies in the war against Islamic State.

Elite military units seeking to restore federal government authority over territory and resources seized by Kurdish forces during the push against Islamic State advanced toward Kirkuk overnight, and by evening they had taken control of...