With a reach weapon, a creature can make melee attacks against enemies that are 2 squares away from it as well as adjacent enemies. Even so, the wielder can make opportunity attacks only against enemies adjacent to it and can flank only enemies adjacent to it.

Published in Player's Handbook, page(s) 217, Mordenkainen's Magnificent Emporium, page(s) 20, Rules Compendium, page(s) 270.