A source told ESPN.com the deal was worth $1.6 million on average per season for a total of $6.4 million.
Thompson would have been an unrestricted free agent this summer and his name was on the radar of several clubs looking to add depth at center, including the Vancouver Canucks, according to a source.
"We're very pleased to have agreed to a contract extension with Nate," Lightning general manager Steve Yzerman said in a news release. "He has and will continue to be a very important member of our team, both on and off the ice."
Thompson, 28, is a checking-line center who had six goals and 10 points in 30 games entering play Saturday.
"I'd like to thank Steve Yzerman and the organization for having the confidence in me to make me a part of this team for the next four years," said Thompson in the news release. "I see a bright future here for the Lightning and I very much want to be a part of it."