TORONTO — Canada said Wednesday it was phasing out the type of rail tankers involved in last summer’s massive explosion of a runaway oil train that incinerated much of a town in Quebec, killing 47 people and prompting intense public pressure to make oil trains safer.

Canada’s transport minister said the DOT-111 tankers, which are used to carry crude oil and ethanol and are prone to rupture, must be retired or retrofitted within three years. Transport Minister Lisa Raitt’s announcement comes about nine months after the Lac-Megantic accident. Since then, trains carrying oil also have exploded and burned in Alabama, North Dakota and New Brunswick.

The rail industry is deeply integrated across North America, and Wednesday’s announcement was watched closely in the U.S. Both nations’ accident investigators earlier this year implored their governments to impose new safety rules.

The DOT-111 tank car is considered the staple of the North American fleet and makes up about 70 percent of all tankers on the rails. But the concerns surrounding the tanks are not new, and the U.S. National Transportation Safety Board has been urging replacing or retrofitting the tank cars since 1991. The more recent, fiery explosions have brought the public’s attention to the problem.

Raitt said the least crash-resistant of the older DOT-111 tank cars, about 5,000 of them, must be removed from Canadian rails immediately.

“Three years is the amount of time that we thought was the best saw-off between what industry said that they could do and what is wanted by the Transportation Safety Board,” Raitt said.

The three-year phase-out will affect about 65,000 tank cars in North America, including a third or a quarter in Canada. Raitt said the industry thinks the three-year phase-out is “ambitious.”

The transport minister announced the changes in response to recommendations by Canada’s Transportation Safety Board in the aftermath of the Quebec tragedy.

Canada’s safety board has said a long phase-out would not be good enough. Safety experts have said the soda-can shaped car has a tendency to split open during derailments and other major accidents.

Rail carriers will also be required to prepare emergency response assistance plans for shipments of all petroleum products, including everything for crude oil to diesel. Trains will also be forced to slow as they move through communities.

The Lac-Megantic accident in July, near the Maine border, involved oil from the Bakken fields in North Dakota. It killed 47 and burned 30 buildings that made up much of the downtown.

Rail and safety officials said they were surprised by the ferocity of the fire. They were used to dealing with sludge-like crude that doesn’t ignite easily, but Canadian investigators said the combustibility of the 1.3 million gallons of light, sweet Bakken crude released in Lac-Megantic was more comparable to gasoline.

There have been eight significant accidents in the U.S. and Canada in the past year involving trains hauling crude oil, including several that resulted in spectacular fires, according to a presentation by crash investigators at a two-day National Transportation Safety Board forum this week on the transport of crude oil and ethanol. Most of the accidents occurred in lightly populated areas, although one derailment and fire in December occurred less than two miles from the town of Casselton, N.D.

The oil industry is using every tank car available to keep up with the exponential growth in Bakken oil production since hydraulic fracturing, or “fracking,” made it possible to extract more oil from the ground. Freight railroads transported 434,032 carloads of crude in 2013, up from just 9,500 in 2008. Three years ago, the U.S. became a net exporter of petroleum products for the first time since 1949. Ethanol production has also escalated dramatically, creating competition for available rail cars. About 69,000 carloads of ethanol were shipped on rails in 2005. Last year, it was about 325,000 carloads.

Some companies have said they will voluntarily take the DOT-111 tank cars offline. Irving Oil Ltd., a large Canadian refiner, has said it will stop using the older DOT-111s by April 30.