The AIADMK-BJP will also team up for by-elections to 21 assembly seats.

The BJP on Tuesday closed the deal on its alliance with Tamil Nadu's ruling AIADMK for the national election, hoping to expand its base in a southern state where it has been only a marginal presence without the crutch of regional giants.

The AIADMK said the BJP had been assigned five of the state's 39 parliamentary seats - Puducherry adds one more seat. For the BJP, which won a grand total of one seat in the 2014 national election (two counting its alliance partners), it is a good bargain. The BJP's Pon Radhakrishnan, who won the party's lone seat - Kanyakumari - became a union minister.

The two parties will also team up for by-elections to 21 assembly seats, said Union Minister Piyush Goyal, the BJP's negotiator.

"The alliance will contest the Tamil Nadu elections under the leadership of the AIADMK and the national elections in the name of Prime Minister Narendra Modi," said Piyush Goyal. He expressed confidence that the alliance would win all 40 seats, including Puducherry, "as a mark of respect to late Jayalalithaaji, the honourable Amma."

Earlier on Tuesday, the AIADMK had announced a pact with the PMK after Chief Minister E Palaniswami and his deputy O Panneerselvam met with its chief S Ramadoss. The PMK, which spent a good part of the last two years accusing the AIADMK of deep-rooted corruption, will have seven seats in the coalition.

Tamil Nadu Chief Minister Edappadi K Palaniswami, Deputy Chief Minister O Panneerselvam and senior leaders of AIADMK and PMK show a signed copy of alliance agreement.

That means the AIADMK, which swept the last national election, winning 37 seats, settles for at least 12 less.

The AIADMK, pursued by the BJP, held out for long and even declared more than once that such an alliance was out of the question. The BJP, having scored a duck in the last Tamil Nadu election, aggressively chased an alliance.

Over the past two years, the AIADMK is seen to have been considerably weakened by the death of its charismatic leader Jayalalithaa in 2016.

The AIADMK subsequently split down the middle with a rebel faction supporting Jayalalithaa's closest aide VK Sasikala, who made a failed bid to take over the party and chief ministership before being jailed for corruption. Sasikala's nephew TTV Dhinakaran has launched AMMK and even won Jayalalithaa's RK Nagar constituency in a by-election.

The rival camp, DMK and Congress, may also announce their tie-up soon. DMK leader Kanimozhi met with Congress chief Rahul Gandhi on Tuesday with the offer of 10 seats.

Both the tie-ups, for now, miss the presence of megastars Rajinikanth and Kamal Haasan, who plunged into politics last year and were perceived as big factors in the state.

Rajinikanth declared on Sunday that he would not contest the polls and that no party should use his outfit to capitalise on votes.

(With inputs from PTI)