Rins’ team-mate Joan Mir finished third to take a six-point lead at the top of the championship ahead of Fabio Quartararo, who started at the top of the grid but finished a disappointing 18th for Petronas Yamaha.
Starting 10th on the grid, Rins stormed out of the blocks to move up to fourth on the opening lap before moving past Yamaha’s early pace-setter Maverick Vinales to take the lead on lap eight.
Marquez climbed up nine spots and tested Rins in the final five laps, but the Suzuki rider held his nerve to seal victory on home soil.
Rins finished 0.263 seconds in front of Marquez. He also set the fastest lap.
“I had to make sure I didn’t break the rear tyre and also manage the distance from Marquez in the end,” said Rins, who moved up to seventh in the championship. “It’s amazing, this victory is for all the fans who visit from all the towns around here.”
Marquez, brother of six-time MotoGP champion Marc Marquez, was coming off another second-place finish at Le Mans a week ago.
“I didn’t expect to be on the podium starting from 11th place,” Alex Marquez said. “I attacked like crazy.”
Marc Marquez, who is out injured, wrote on Twitter shortly after the race: “Hi everyone, I’m Alex Marquez’s brother.”
Mir’s pace dropped dramatically in the final lap but he did enough to finish ahead of Vinales, who came fourth to move up to 12 points behind the championship leader.
Former Moto 3 champion Mir is yet to win a race this season but has racked up five podiums, becoming Suzuki’s first premier class championship leader since Kenny Roberts Jr won the title in 2000.
Quartararo finished out of the points after gradually dropping positions throughout the race at the MotorLand circuit. The 21-year-old Frenchman crashed in a practice session before qualifying on Saturday and had to be taken to the tracks medical centre.
The race was the first without a premier class champion on the grid since 1999, with Valentino Rossi self-isolating after testing positive for Covid-19.
No fans were at the track on Sunday because of the coronavirus pandemic.
The riders will race in Aragon again next weekend. The following two races will also take place in Spain, at the Ricardo Tormo circuit in Valencia. The championship then finishes in the Algarve, in Portugal.