US President Barack Obama welcomed the 'historic' signing of a long-delayed bilateral security agreement with Afghanistan to allow about 10,000 US troops to stay in the country next year.