James McCarthy has signed a new five-year contract and Kevin Mirallas is close to ending uncertainty over his Everton futures by signing a new deal.

Tottenham Hotspur and Manchester City had been linked with McCarthy this summer although the Everton manager, Roberto Martínez, who brought the midfielder with him from Wigan Athletic for £13m in 2013, was consistent in his stance that the 24-year-old is not for sale.

Spurs’ interest materialised amid reports that the Republic of Ireland international was unhappy that his initial contract with Everton had not been improved as agreed. But that issue has been resolved and McCarthy has signed a deal to keep him at Goodison Park until 2020. Mirallas, who was linked with a transfer to West Ham United this summer, is also close to agreeing a contract extension.

Speaking to the club’s official website, McCarthy said: I’m buzzing and delighted to be committing my future long-term to Everton. I’ve loved every minute I’ve been here, with the fans having made me feel so welcome from day one, as well as the players and staff.

“This is a brilliant club with a brilliant fanbase and what we want to try to do is bring some success here and push forward. The gaffer is trying to build a team and a squad for the long-term and I’m excited to be a part of that and to be a part of this team.”

Earlier on Thursday before confirmation of McCarthy’s signing, Martínez said: “The situation is James is not going anywhere. There are reports of a possible sale and I can guarantee that is not going to happen because he’s a player we want to build our future around and he has got a long, long-term contract, another four years, and we made a big investment in him.

“He was a big investment from the Championship when we brought him in, we want the player to be happy, and we hope we will get the positive news over the next few days – on everyone; on any player that has been mentioned that could be leaving.”