Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

CBS and its controlling shareholder are trying to settle their contentious court battle.

The independent directors of CBS and representatives of National Amusements, the controlling shareholder of CBS, are in discussions that could help them avoid meeting in a Delaware court in October, according to two people close to the discussions who were not authorized to speak publicly.

The two companies have been locked in a heated legal battle since May, when CBS sued National Amusements and sought to dilute its parent company's ownership, a move that would have made CBS into an independent company.

Byers Market Newsletter Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The discussions between the two parties became more serious over Labor Day weekend, according to one person. This source added that the two sides have continued to talk even with litigation pending. The online entertainment publication Deadline was first to report the talks.

One person familiar with the talks warned that the two sides may still not reach an agreement.

Conversations are being led by CBS independent director Bruce Gordon, according to the source, who said that the two sides are trying to find a way for CBS to "maximize shareholder value." That probably means National Amusements would have to give up on the idea of merging CBS and Viacom, another company that National Amusements controls. CBS has argued that a merger with Viacom would be bad for CBS.

The legal battle has been complicated by sexual misconduct allegations against Les Moonves, the CBS chief executive who is considered one of the most powerful people in the entertainment industry. Moonves has denied any wrongdoing.

CBS has hired two major law firms to conduct an independent investigation into the allegations. Meanwhile, National Amusements has been quietly shopping for a replacement for Moonves, though there is no indication that he will voluntarily step down.

National Amusements has been considering a change in the membership of the CBS board, according to one source. One CBS director, Doug Morris, turns 80 in November and would have to stand down for that reason, according to this person. CBS has postponed its annual meeting, where the board's directors are renewed or new directors are voted in.

Representatives for National Amusements and CBS both declined to comment.