18 G ross G ross Amortized Unrealized Unrealized December 31, 2012 Cost Gains Losses Fair Value U. S. treasury securities $  246 $ - $ $  246 U. S. agency securities 1, 305 107 1, 412 State and municipal securities 8, 732 315 ( 19)  9, 028 Mortgage- backed securities 16, 477 602 ( 28)  17, 051 Collateralized mortgage obligations 8, 334 158 ( 1)  8, 491 35, 094 $  1, 182 $ ( 48) $  36, 228 All state and municipal securities undergo an initial and ongoing credit analysis. The analysis includes the review of various financial and demographic information. All municipal securities have a minimum evaluation rating of investment grade.  All mortgage- backed securities and collateralized mortgage obligations are issued by government- sponsored enterprises ( GSE) or by the Government National Mortgage Association ( GNMA).  GSE securities carry an implied U. S.  Government guarantee and the GSE guarantees the timely payment of principal and interest.  GNMA carries the full faith and credit guarantee of the U. S. Government.  Gross gains totaling $ 63, 000 and $ -0- were realized on the sale or call of securities in 2013 and 2012, respectively. There were no gross losses in 2013 and 2012.  The amortized cost and fair value of securities as of December 31, 2013, by contractual maturity,  are shown below.  Expected maturities may differ from contractual maturities because the securities may be called or prepaid with or without any penalty ( in thousands):  Book Amortized Market Fair Cost Value Due in one year or less 250 255 Due after one year through five years 3, 540 3, 631 Due after five years through ten years 5, 638 5, 497 Due after ten years 3, 423 3, 379 Mortgage- backed securities 20, 891 20, 889 Collateralized mortgage obligations 5, 498 5, 552 39, 240 $  39, 203