Vettel was in the final year of his contract with Ferrari but has committed his future to the Italians.
The statement said: “Ferrari announces that Scuderia Ferrari has extended its technical and racing agreement with driver Sebastian Vettel for the 2018, 2019 and 2020 racing seasons of the Formula One World Championship.”
Vettel follows his team-mate Kimi Raikkonen in extending his time, after the Finn agreed a one-year extension to stay for 2018.
But Mercedes non-executive chairman Niki Lauda has revealed Vettel held talks with them before ending negotiations.
He said: “We discussed briefly once with him but the more the competitive the Ferrari goes the less the reason he would to leave.

vCard.red is a free platform for creating a mobile-friendly digital business cards. You can easily create a vCard and generate a QR code for it, allowing others to scan and save your contact details instantly.
The platform allows you to display contact information, social media links, services, and products all in one shareable link. Optional features include appointment scheduling, WhatsApp-based storefronts, media galleries, and custom design options.
“So therefore we stopped it right away a couple of months ago.”
Ahead of qualifying this afternoon at the Belgian Grand Prix, Raikkonen was quickest in third practice.
Vettel came home in second, separated from Hamilton by just a thousandth of a second.