The flames also forced a series of evacuations, officials said.
“Naval Hospital Camp Pendleton evacuated approximately 30 patients to local area hospitals and is not accepting new patients due to a power outage,” the Marine Corps said in a statement.
There was no immediate threat to the hospital, according to the Marine Corps.
Residents living at the O’Neill Heights housing facility were also evacuated, officials said.
The fire broke out Saturday afternoon and was fueled by hot, dry conditions. It caused minor damage to four buildings.
The area is closed to all traffic at DeLuz Road at Vandergrift Boulevard and Santa Margarita Road at Vandergrift Boulevard, according to the Marine Corps.
Eight ground crews and nine brush trucks were brought in to battle the flames, the Marine Corps said.
They were assisted by six air tankers, five helicopters, and two other air craft.
The blaze was 15 percent contained as of midnight.