Exhibit 5.0

[Letterhead of LeClairRyan, A Professional Corporation]

July 27, 2011

Board of Directors

Union First Market Bankshares Corporation

111 Virginia Street, Suite 200

Richmond, Virginia 23219

Gentlemen:

We have acted as counsel to Union First Market Bankshares Corporation, a Virginia corporation (the “Company”), in connection with the preparation and filing of a Registration Statement on Form S-8 (the “Registration Statement”) with the Securities and Exchange Commission. The Registration Statement registers 1,000,000 shares of common stock, par value $1.33 per share, which have been reserved for issuance under the Union First Market Bankshares Corporation 2011 Stock Incentive Plan (the “Plan”).

We have examined the Registration Statement and such corporate records, certificates and other documents as we deemed necessary for the purpose of this opinion. Furthermore, we have made such factual inquiries and reviewed such laws as we determined to be relevant for this opinion.

Based upon and subject to the foregoing, it is our opinion that the 1,000,000 shares of common stock which are authorized for issuance under the Plan, when issued and sold in accordance with the terms and provisions of the Plan, will be legally issued, fully paid and non-assessable.

We consent to the filing of this opinion as an exhibit to the Registration Statement. In giving such consent, we do not thereby admit that we are in the category of persons whose consent is required under Section 7 of the Securities Act of 1933.

Very truly yours,

/s/ LeClairRyan, A Professional Corporation