FILE PHOTO: The AT&T logo is pictured during the Forbes Forum 2017 in Mexico City, Mexico, September 18, 2017. REUTERS/Edgard Garrido

(Reuters) - AT&T Inc T.N said Friday it will again buy advertising on Alphabet Inc's GOOGL.O YouTube, nearly two years after the U.S. wireless carrier left the video platform when it discovered its ads may have appeared next to inappropriate content.

AT&T is one of the largest U.S. brand marketers by total ad spend, according to research firm eMarketer, and its return caps off a tumultuous period for YouTube beginning in March 2017, when major advertisers including Verizon Communications Inc VZ.N and Johnson & Johnson JNJ.N, left the platform after their ads played during videos featuring hate speech or other disturbing material.

As brands eventually returned to YouTube, AT&T remained a major advertiser that held back.

After 22 months of working closely with Google, AT&T said it was confident “that there is a near-zero possibility” its ads could end up appearing next to inappropriate or unapproved content on YouTube, Fiona Carter, AT&T’s chief brand officer, said in an interview.

Increased human review of videos and improved machine learning and artificial intelligence (AI) within YouTube helped AT&T decide to return, Carter said. Additionally, AT&T ran three “dummy” ad campaigns that used Google house ads to mimic how AT&T would run its own ad campaigns, so the company could be sure they would not unintentionally appear on videos that were counter to its corporate values.

AT&T reviews the content and topics it considers appropriate for its brand on a quarterly basis. It avoids advertising next to content that is violent or extremist, or includes hate speech and adult content, using YouTube’s Brand Suitability System, a set of stricter advertising rules the platform put in place last year.

“We knew that we needed to have our hands on the wheel,” Carter said, adding she was happy with how Google rose to the challenge to address brand safety on YouTube.

AT&T will begin purchasing ads over the coming weeks, though Carter declined to say how much the company expects to spend on YouTube.