Iraq moved a step closer to ending the US occupation after the cabinet approved the deal , which requires US and coalition troops to pull back from cities by next summer and leave the country by 2012 .