We study a game with two candidates and two interest groups. The groups offer two kinds of costly contributions to achieve political influence: (a) pre-election campaign contributions to their favourite candidates that increase their probability of winning the election and (b) post-election lobbying contributions to the winning candidate to affect the implemented policy. The candidates are the first to act by strategically choosing the lobbying prices they will charge the groups if they are elected. We characterise the equilibrium values of the lobbying prices set by the candidates as well as the equilibrium levels of the campaign and lobbying contributions chosen by the groups. We show, endogenously, that in the case with symmetric groups and symmetric politicians, a candidate announces to charge the group that supports her in the election a lower lobbying price, justifying this way the preferential treatment to certain groups from the politicians in office. We also consider two extensions (asymmetric groups and politicians who do not commit to the announced prices) and show that the results of the benchmark model hold under specific conditions.