Gray joined Northampton as manager in January 2007
Northampton Town part company with manager Stuart Gray after more than two-and-a-half years at Sixfields.
The Cobblers, who are 16th in League Two, have suffered a disappointing start to the season after being relegated last term.
Chairman David Cardoza told the club's website: "It is with a heavy heart that we have come to this decision.
"It is necessary to consider the best interests of the club, long term and to try and win promotion this season."
Northampton have won just two of their first six games, collecting seven points.
And Cardoza added: "We, the board of directors, gave Stuart every opportunity to strengthen this summer and to build a squad capable of taking the club straight back up.
Bookmark with:
What are these?