According to the Coast Guard, this all happened Saturday afternoon around 3 p.m.
It's not exactly clear how the two vessels collided with each other or why they were so close, but teams from the San Francisco Fire Department and Coast Guard scrambled to the collision.
One of the people rescued was suffering from hypothermia. Both were safely brought to shore and checked out by paramedics.
We spoke with two people who saw the commotion. They say it rattled what was otherwise a calm day.
"Well, there was a fire truck, there was an ambulance, there was a Coast Guard boat, and there was some kind of police boat or something like an emergency boat, and they came through on the other side of the pier, "said witness Imran Tibrani.
A Coast Guard spokesperson tells us the two people who were rescued were checked out by paramedics on shore and were released.
The tug boat involved in the collision has been ordered to return to its port. It will be inspected as part of the standard Coast Guard investigation of this crash.