The Egyptian authorities agreed to restrict the Palestinian pilgrims' re-entry after a meeting with Israeli Defence Minister Ehud Barak, --------------- Israeli officials quoted by the Associated Press news agency.

A) in accordance with
B) according to

I think A and B have the same meaning, but why is the key A?
I would have said the answer is B.

A and B do not have the same meaning.

according to introduces the phrase that explains who said something. according to the president, according to my nephew, according to French officials, according to experts, ...

in accordance with means in agreement with or in keeping with or in the same vein as. in accordance with the rules, in accordance with long-established traditions, ...

According to is used to attribute information to a source.

In accordance with is used to indicate compliance.