The fire was reported at 11:26 a.m. on a steep slope behind Alhambra High School, located at 150 E St., fire Capt. Kent Kirby said.
Crews were "able to get a handle on it rapidly," he said.
The fire was contained around noon, but because of its proximity to the high school, Martinez police initiated a lockdown at the campus, Kirby said.
The 2-acre fire, which Kirby said created a lot of smoke, destroyed an 8-by-10-foot shed containing power tools and other items, and burned part of a fence. The charred area was mostly grass, but the flames did reach an area about 50 feet from homes, Kirby said.
As of 12:40 p.m., crews remained in the area mopping up and monitoring hot spots, Kirby said.