These are notes of my lectures at the summer school Higher-dimensional geometry over finite fields in Goettingen, June--July 2007. We present a proof of Tates theorem on homomorphisms of abelian varieties over finite fields (including the $ell=p$ case) that is based on a quaternion trick. In fact, a a slightly stronger version of those theorems with finite coefficients is proven.