ESG funds may be used to provide housing relocation and stabilization services and short- and/or medium-term rental assistance necessary to prevent an individual or family from moving into an emergency shelter or another place described in paragraph (1) of the ``homeless'' definition in Sec. 576.2. This assistance, referred to as homelessness prevention, may be provided to individuals and families who meet the criteria under the ``at risk of homelessness'' definition, or who meet the criteria in paragraph (2), (3), or (4) of the ``homeless'' definition in Sec. 576.2 and have an annual income below 30 percent of median family income for the area, as determined by HUD. The costs of homelessness prevention are only eligible to the extent that the assistance is necessary to help the program participant regain stability in the program participant's current permanent housing or move into other permanent housing and achieve stability in that housing. Homelessness prevention must be provided in accordance with the housing relocation and stabilization services requirements in Sec. 576.105, the short-term and medium-term rental assistance requirements in Sec. 576.106, and the written standards and procedures established under Sec. 576.400.