Most intrinsic muscles of the hand are innervated by the ulnar nerve, except for the thenar muscles and two lateral lumbrical muscles, which are innervated by the median nerve.
All muscles in the posterior compartments of the arm and forearm are innervated by the radial nerve.