Nosworthy put pen to paper on the new deal on the pitch before the match against Millwall at Priestfield Stadium on Saturday, heading-off fears that the 21-year-old might walk away on a free transfer when his present contract expired in a years time.
A spokesman for the club said: "He's a great player with a great attitude. Fair play to Nyron, he has pledged his future to the club."
Nosworthy has been at the club since 1998 and has made 90 first-team appearances for the Gills, scoring one goal.