NEW YORK (AP) _ Trouble, it seems, is as much a tradition as shamrocks, green beer and Irish-for-a-day conviviality at New York's St. Patrick's Day parade.

This year's march up Fifth Avenue could see the first boycott by a mayor in recent memory because a gay organization was denied a place in line.

Last week, a wrangle over six children in wheelchairs joining Saturday's parade ended only when organizers relented. The children can now hook up with another group but can't carry banners.

And bagpiper Maurice Whelan, who led the parade for five years, said he was fired for insisting on wearing a sash calling for the release of an imprisoned member of the Irish Republican Army.

Such disputes are practically tradition for the parade, which was first held March 17, 1762, and has been run since 1838 by the Ancient Order of Hibernians. They take their parade seriously.

''It's the oldest parade in the nation and it is the most prestigious, really,'' said one-time grand marshal and former City Council President Paul O'Dwyer. ''There's a tremendous amount of sentiment associated with it.''

The group formed ''for the purpose of fighting discrimination in employment in a period when 'No Irish need apply' was very common,'' O'Dwyer said. ''It's regrettable that they are now charged with discriminating themselves.''

The parade's contentious history goes way back.

When large numbers of Irish fleeing famine arrived here in the 1840s, the parade often met violence from Know-Nothings, an anti-immigrant and anti- Catholic political movement.

In 1868, because of a lack of Irish bands, German bands took part. The Irish Citizen newspaper reported that marchers complained the music ''could never awaken a responsive throb in their hearts, or impart a spring to their step.''

The Irish writer Brendan Behan was banned from the 1961 parade as ''a common drunk and disorderly person.''

Dorothy Cudahy caused a stir in 1985 when she wanted to be grand marshal. It was not until 1989 that she became the first woman to lead the parade.

Many more brouhahas involved politics.

During the early 1940s, the Hibernians barred Transport Workers Union President Michael ''Red Mike'' Quill - an alleged communist sympathizer.

In 1983, when IRA supporter Michael Flannery was selected grand marshal, many perennial marchers sat out the parade, including Sen. Daniel P. Moynihan, former Gov. Hugh L. Carey and 17 high school marching bands.

The government of the Republic of Ireland also boycotted that parade, as it did two years later when another vocal IRA backer was grand marshal.

This year, gay groups promise to protest if the Irish Lesbian and Gay Organization isn't allowed in.

Initially, parade officials cited city constraints on the parade's duration; additional parade groups would add to the usual length of six or seven hours and the city didn't want to pay to staff it.

But when Mayor David Dinkins offered to add one hour to the parade, the parade committee rejected his proposal. That unleashed cries of discrimination.

''My intention now is to march,'' Dinkins said Tuesday. But he could change his mind. ''A lot of it will depend on how this discussion, negotiation goes.''

''This is not only a slap in the face for our group,'' said Anne Maguire, a spokeswoman for the gay group. ''It's quite obvious the gay and lesbian community in New York is under attack.''