A violent 15-month strike by the United Mine Workers against Richmond-based A.T. Massey Coal Co. has been settled, but residents in the towns along the West Virginia-Kentucky border, where grudge-holding Hatfields and McCoys feuded, can't agree on who won.

UMW President Richard Trumka said the company conceded on the key issue, a charge of unfair labor practice, and that union miners will return to work within a month. Trumka said remaining differences would be ironed out in court or as part of grievance proceedings, rather than in contract language.

But company President E. Morgan Massey of Richmond said any union workers who go back to their jobs "will do so without a UMW contract." The company, a subsidiary of Royal-Dutch Shell, is the nation's sixth-largest coal producer.

Irvin Smith, of Buskirk, Ky., who will return to work at Massey's Blackberry Creek mine, called it "a real good Christmas present . . . . I actually cried" upon hearing the news.

His wife, Hazel, said she told her children that a Christmas party scheduled for Monday now will be "a victory party."

But Charles Canterbury, of Lenore, W.Va., one of several strikers hospitalized last summer after their car was rammed by a nonunion coal truck, said, "I don't know if it the agreement will work or not."

Jim Reid, president of Local 2248, is celebrating with a full-page advertisement to run in Monday's edition of the Williamson, W.Va., Daily News that proclaims victory over the company.

Don Blankenship, the top Massey manager in the coal-rich Tug Valley, said the union's interpretation of the decision reminded him of a race in which the United States beat the Soviet Union, after which Soviet officials told their people that America finished "next to last."

In recent weeks, most of the battles were legal ones. But earlier this year, violence was common. Tensions escalated in February, when the company told the 2,500 strikers to return to work or be replaced.

Massey imported uniformed armed guards, who defended the mines and processing plants with attack dogs. They patrolled the mountains and hollows by helicopter, photographing strikers and their families. The guards and replacement workers lived in a barracks-like compound that was supplied by a Chicago caterer.

The union responded by holding mass rallies outside mine entrances, including church services and picnics. Pickets used their pickup trucks, and bodies, to set up serpentine blockades in largely unsuccessful attempts to halt shipment of coal along the roads and railroad tracks.

Snipers fired shots on both sides of the river, tires were slit, rocks were tossed, pickets' cars were run off the road, company equipment was firebombed, and in May, a nonunion coal truck driver was shot to death in Pike County, Ky.

The strike began Oct. 1, 1984, after Massey refused to sign the union's agreement with the Bituminous Coal Operators Association, a nationwide industry bargaining group. Massey contended that its various subsidiaries were independent companies, free to negotiate separate contracts, while the union argued that Massey was a common employer, bound by the nationwide agreement.

Under terms of a settlement of an unfair labor practice complaint, announced Friday in Charleston, W.Va., by the National Labor Relations Board, Massey agreed to bargain with the union as a single employer, although the company did not admit it was in violation of federal law.

Paul S. Barbery, Massey's general counsel, said here today that the strikers "still will be represented by the union," but they will return to work under existing terms and conditions, rather than the nationwide contract, possibly side-by-side with nonunion miners.

Trumka said he expects Massey to act in good faith and warned that "if Massey continues to insist on playing its corporate shell game, we will see them in court on Monday, on Tuesday and every day it takes.