FORTUNE — Airbnb has reached a settlement with New York Attorney General Eric Schneiderman over the state’s latest subpoena of user records from the online room rental service.

Schneiderman’s deputy attorney general, Janet Sabel, and Airbnb deputy general counsel Darren Weingard issued a joint statement Wednesday morning announcing the fact that the two sides have come to terms: “Airbnb and the Office of the Attorney General have worked tirelessly over the past six months to come to an agreement that appropriately balances Attorney General Schneiderman’s commitment to protecting New York’s residents and tourists from illegal hotels with Airbnb’s concerns about the privacy of thousands of other hosts. The arrangement we have reached today for compliance with the OAG subpoena strikes this balance.”

Schneiderman had a previous attempt to gain access to Airbnb’s user information blocked by a state judge last week. The state’s top attorney filed a new subpoena last Wednesday, a day after the judge’s decision, in the hopes of uncovering the identities of the site’s users in New York who are renting out their apartments and homes.

MORE: New York attorney general issues new subpoena in Airbnb case

In New York, it is illegal for most residents of apartment buildings to rent out space in their unit for less than 30 days unless they are present during the rental period. Another hotly debated issue is whether or not the 15% occupancy tax usually paid by hotels should also apply to Airbnb hosts.

Under the terms of the agreement between Airbnb and the state, the website will begin providing Schneiderman’s office with anonymized user data within the next three weeks, a process expected to take less than 30 days. The anonymized data will not include users’ names, e-mail addresses, telephone numbers or any social media information. Social security and tax information will also be redacted while website user names and users’ unit or apartment numbers will be replaced with “unique identifiers.”

Over the following year, should the Attorney General’s Office decide to investigate or seek enforcement against any anonymous users based on the information Airbnb provides, the website will comply with the state’s wishes to uncover those users’ identities.

MORE: Behind Airbnb’s legal fights, grassroots activism

Airbnb will also start asking hosts listing new properties in New York over the next year to read a disclaimer (included in the terms of the agreement as “Exhibit A”) informing them of New York’s multiple dwelling law as well as various tax and rent regulations. At the bottom of the disclaimer, Airbnb recommends that users “consult a local lawyer or tax professional.”