The Baldwin, Phillips, and Terlevich emission-line ratio diagnostic ([OIII]/Hβ versus [NII]/Hα, hereafter BPT diagram) efficiently separates galaxies whose signal is dominated by star formation (BPT-SF) from those dominated by AGN activity (BPT-AGN). Yet the BPT diagram is limited to z<0.5, the redshift at which [NII]λ6584 leaves the optical spectral window. Using the Sloan Digital Sky Survey (SDSS), we construct a new diagnostic, or TBT diagram, that is based on rest-frame g−z color, [NeIII]λ3869, and [OII]λλ3726+3729 and can be used for galaxies out to z<1.4. The TBT diagram identifies 98.7% of the SDSS BPT-AGN as TBT-AGN and 97% of the SDSS BPT-SF as TBT-SF. Furthermore, it identifies 97% of the OPTX Chandra X-ray selected AGNs as TBT-AGN. This is in contrast to the BPT diagram, which misidentifies 20% of X-ray selected AGNs as BPT-SF.