That left Marquez to cruise to a 17.578sec victory, while Koyama collected second and Marquez' Ajo Derbi team-mate Sandro Cortese claimed third, in his home race, after a strong charge in the second half of the race.
Marquez, who began the race just one point in front of Espargaro, is now 26 points clear heading into the summer break. The 125cc and Moto2 classes don't race at Laguna Seca.
Smith's Aspar Aprilia team-mate and former title leader Nico Terol missed the event due to back injuries sustained last time out in Catalunya.
Race results - Germany:
1. Marquez (Derbi) 27 laps
2. Koyama (Aprilia) +17.578s
3. Cortese (Derbi) +18.263s
4. Rabat (Aprilia) +19.098s
5. Smith (Aprilia) +19.713s
6. Zarco (Aprilia) +44.976s
7. Webb (Aprilia) +53.243s
8. Vazquez (Derbi) +53.302s
9. Fagerhaug (Aprilia) +53.589s
10. Kartheininger (KTM) +1m 5.078s