In a move that may be the first of its kind in the country, Cambridge will soon begin making payments to same-sex married public employees to defray the cost of what local officials have called a discriminatory federal tax.

Beginning in July, the city will begin paying quarterly stipends to city employees in a same-sex marriage who must pay federal taxes on the value of the health benefits their spouse receives from the city.

Federal law requires employers to calculate the value of the benefits received by a same-sex spouse as taxable income to the employee, but health benefits for opposite sex spouses of employees are not taxable.