The first shooting happened in the Bayview district about 6:43 p.m. when a 24-year-old man was walking in the area of Oakdale Avenue and Baldwin Court.
The victim was struck in the toe, police said. He told police he thought the gunshots came from a moving vehicle. There are no known suspects at this time.
The man went to the hospital on his own and his injury was not life-threatening.
The second shooting occurred in the Tenderloin about two hours later, police said. The 55-year-old victim was shot in the groin and leg in the 400 block of Ellis Street.
The suspect who shot him fled but was later arrested, police said.
He was identified by police as 40-year-old Marcos Guillen. Guillen has no known address, police Officer Albie Esparza said.
He was booked on charges of assault with a deadly weapon and possession of a loaded firearm, Esparza said.
The victim was hospitalized, but his injuries were not life-threatening.
The victim told police he did not known Guillen and that the shooting was unprovoked, Esparza said.