A S U (N )L×S U (N )R gauge theory for a scalar multiplet Y transforming in the bifundamental representation (N ,N ¯) preserves, for N >4 , an accidental U (1 ) symmetry first broken at operator dimension N . A vacuum expectation value for Y can break the symmetry to Hs=S U (N )L+R or to Hh=S U (N -1 )L×S U (N -1 )R×U (1 )L +R . In the first case the accidental U (1 ) gets also broken, yielding a pseudo-Nambu-Goldstone boson with mass suppression controlled by N . In the second case a global U (1 ) remains unbroken. The strong C P problem is solved by coupling Y to new fermions carrying color. The first case allows for a Peccei-Quinn solution with U (1 )PQ protected by the gauge symmetry up to order N . In the second case U (1 ) can get broken by condensates of the new strong dynamics, resulting in a composite axion. By coupling Y to fermions carrying only weak isospin, models for axionlike particles can be constructed.