A swimmer was bitten Saturday by a juvenile great white shark that grew agitated trying to free itself from a hook a fisherman had thrown into the water off a Southern California beach, officials said. The man, who was with a group of long-distance swimmers when he swam into the fishing line, was bitten on a side of his rib cage around 9:30 a.m., said Rick Flores, a Los Angeles County Fire Department spokesman. The man's injuries were not life-threatening and he was taken to a hospital conscious and breathing on his own, AP quoted Flores as saying. Witnesses said the approximately 7-foot (2-meter) shark was thrashing around in the water for more than 30 minutes before biting the swimmer about 300 yards (274 meters) off Manhattan Beach. The fisherman cut the line, and a surfer put the injured swimmer on his board, taking him ashore with the help of Los Angeles County lifeguards. Paramedics began treating the man. The shark remained in the area for the next 20 minutes and then disappeared into the murky water, Flores said. The beaches remained open, but a mile-long stretch was temporarily off-limits to swimmers. Police also prohibited fishing from the pier until Tuesday as a precaution.