The Calgary Flames came to Buffalo intent on landing a starting goaltender and secured one during the draft Friday night.

The Flames acquired Brian Elliott from the St. Louis Blues in exchange for a second-round draft pick (35th overall) in 2018 and a conditional third-rounder.

Elliott is entering the final year of his current contract, which carries a modest $2.5-million salary cap hit, in 2016-17.

If the Newmarket, Ont., native re-signs in Calgary, St. Louis will also receive a third-round draft pick in 2018 from the Flames.

Elliott, 31, finished 2015-16 with an NHL-best .930 save percentage, a fantastic 23-8-6 record and four shutouts. He followed up with an excellent post-season, backstopping St. Louis to the Western Conference final.

St. Louis had been rolling with a tandem of Elliott and Jake Allen. The younger Allen is also scheduled to become a free agent (restricted) in the summer of 2017, and it was unlikely the Blues could afford to keep both netminders beyond that point.

Reports of the Flames inquiring about a number of veteran goaltenders — Marc-Andre Fleury, Jimmy Howard, Ben Bishop — flew around this week as GM Brad Treliving hunted for a new No. 1.

The Flames ranked last in goals against in 2015-16 and allowed both Jonas Hiller and Karri Ramo to leave after their contracts expired.