US food and drug regulators have ruled that Merck's withdrawn painkiller Vioxx should be allowed to be sold in the US.
The FDA will now decide whether to accept the recommendations
Vioxx was withdrawn from shops last year after being linked to a high risk of heart attack and stroke.
The Food and Drug Administration (FDA) advisory panel also voted to allow Pfizer's painkiller Celebrex to remain on sale, despite worries about it too.
Merck's share price closed up by 13% in the wake of the news, and Pfizer's increased by almost 7%.
The tablets, known as Cox-2 inhibitors, were developed by drug companies, including Merck and Pfizer, because they cause fewer stomach problems than other painkillers.
Vioxx was withdrawn from shops last year, but Merck this week said it would consider selling it if it was successful in obtaining FDA approval.
The advisory panel said on Friday that the drugs pose a risk of heart trouble, but should be available to those who need them.
The FDA is not required to follow the recommendations of the panel but generally does so.
"Merck has appreciated the opportunity to present data at this advisory committee meeting," the company said in a statement.
"We look forward to discussions with the FDA."
Most of the FDA advisers said Vioxx, Celebrex and Bextra should all have "black box" warnings on their heart risks.
Putting Vioxx back on the shelves should boost profits at Merck.
Merck voluntarily stopped sales of Vioxx on 30 September, a move which caused the firm's fourth-quarter earnings to slide to $1.1bn (£581m), from $1.4bn a year earlier.
Merck's shares tumbled more than 10% on the news and the company has had to set aside millions of dollars to cover the cost of Vioxx-related litigation.
Concerns were initially raised by a research note called Approve, which showed that the risk of heart attack and stroke doubled in patients who had been taking the drug for at least 18 months.
Pfizer is still selling its Celebrex and Bextra products, though investigations have suggested that they may also be harmful to the heart. On Friday the advisory panel voted to also authorise arthritis drug Bextra on the market.
Merck's head of research Peter Kim said that it withdrew Vioxx "based on the information that was available to us at the time, knowing there were alternative therapies".
European regulators, meanwhile, ruled on Thursday that patients who have had heart disease or a stroke should not take Cox-2 inhibitors.
The European Medicines Agency also said doctors should be "cautious" about giving the drugs to patients who have risk factors for heart disease.