QuickLinks -- Click here to rapidly navigate through this document
Exhibit 5.1
[NIXON PEABODY LLP LETTERHEAD]
May 29, 2002
Coast Bancorp
553 B Higuera
San Luis Obispo, CA, 93401
Ladies and Gentlemen:
With reference to the Registration Statement on Form SB-2 filed by Coast Bancorp ("Coast") with the Securities and Exchange Commission in connection with the registration under the Securities Act of 1933, as amended, of shares of Coast Common Stock, no par value, (the "Shares") to be issued in connection with the public sale of the Shares by Coast:
We are of the opinion that the Shares have been duly authorized and, when issued in accordance with the Prospectus contained in the Registration Statement, will be validly issued, fully paid and nonassessable.
We hereby consent to the filing of this opinion as Exhibit 5.1 to the Registration Statement, and any amendments thereto, and the use of our name under the caption "Legal Matters" in the Registration Statement, and any amendments thererto, and in the Prospectus included therein.
| | Very truly yours, |
| | | | |
| | /s/ NIXON PEABODY LLP |
QuickLinks
Exhibit 5.1