Canada will require that older rail cars used for carrying crude oil be phased out by May 2017, the government said on Wednesday, moving ahead of the United States to eliminate the cars in light of growing oil-by-rail traffic and a deadly accident last year. The move is a response to recommendations made by the Transportation Safety Board of Canada after a fiery derailment last July in Lac-Mégantic, Quebec, which killed 47 people. The ban was among a series of measures outlined by the government to improve the safety of transporting crude oil by rail, an increasingly common practice in North America, where a shortage of pipeline capacity has forced shippers to find alternatives. Canada’s faster time frame raises the possibility that the older cars will be diverted for use in the United States.