Giving someone a wide berth

What is the origin and basic meaning of th phrase "I give his type a wide berth"?

mortimer

Meaning: I stay away from him, I shun or avoid him, or I'm civil but not cordial--because I dislike or fear him.
Origin: The first definition of "berth" in Webster's Second Unabridged, 1934, is a nautical sense: "Convenient sea room; sufficient room to maneuver under way or to swing at anchor;--esp. in phrases, and often fig.; as, to give a wide berth to."