The Edmonton Oilers have re-signed forward Ryan Smyth to a two-year contract.

Smyth, who rejoined the Oilers for the 2011-12 season after a trade with Los Angeles, agreed to the new deal just moments before he would have become a free agent.

The 36-year-old veteran had 19 goals and 46 points in 82 games with the Oilers last season. He spent the first 11-plus seasons of his career in Edmonton.

Smyth was selected by the Oilers with the sixth overall pick in 1994 and played with the team until he was traded to the New York Islanders during the latter half of the 2006-07 season. He joined Colorado as a free agent on July 1, 2007 and played there for the next two seasons before he was dealt to the Kings.

In 1,151 career regular-season games, Smyth has 374 goals and 806 points. He has also produced 28 goals and 59 points in 93 playoff games, helping the Oilers to the Stanley Cup Finals in the spring of 2006.

Edmonton also signed goaltender Yann Danis to a one-year contract. Danis appeared in one game for the Oilers last season and has 50 games of NHL experience with Montreal, the New York Islanders, New Jersey and Edmonton.